package com.cailu.rabmq.sender.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.cailu.rabmq.sender.sender.SenderConfDirectExchangeTemplate;
import com.cailu.rabmq.sender.version.ApiVersionConstant;
import com.cailu.rabmq.sender.version.ApiVersions;

/**
 * @author cailu
 * @filename SenderConfDirectExchangeController
 * @description 广播模式 Direct Exchange 路由
 * @date 2020/3/31 20:59
 */
@Api(value = "10003-Direct 广播模式", tags = {"10003-Direct 广播模式"})
@RestController
public class SenderConfDirectExchangeController {

	@Autowired
	private SenderConfDirectExchangeTemplate template;

	@GetMapping("sendDirectExchange")
	@ApiOperation(value = "30001-创建 Direct 广播模式 发布者", notes = "创建 Direct 广播模式 发布者")
	@ApiVersions(group = ApiVersionConstant.FAP_APP100)
	public String sendDirectExchange(@ApiParam(value = "自定义发送能容") @RequestParam(value = "str") String str) {
		template.sendDirectExchangeA(str);
		return "广播模式 Direct Exchange 路由  创建成功！";
	}

}
